package com.wing.sell.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.sell.model.entity.SelBarterGoodsRecords;
import com.wing.sell.model.request.SelBarterGoodRecordsUpdateForm;
import com.wing.sell.model.request.SelGoodsLogisticsDetailAddForm;
import com.wing.sell.model.response.SelBarterGoodRecordsSearchVo;
import com.wing.sell.model.response.SelBarterGoodsRecordDetailVo;

import java.util.Map;

/**
 * 退货记录-service
 * @version 1.1.0
 * @Author hz
 * @Date 2024-11-16 15:17
 **/
public interface SelBarterGoodsRecordsService extends IService<SelBarterGoodsRecords> {

    /**
     * 查询换货详情
     * @param pg
     * @param params
     * @return
     */
    Page<SelBarterGoodRecordsSearchVo> pageList4app(Page<SelBarterGoodRecordsSearchVo> pg, Map<String, Object> params);

    /**
     * 添加换货记录
     * @param selBarterGoodRecordsUpdateForm
     * @return
     */
    int addBarterRecordsGoods(SelBarterGoodRecordsUpdateForm selBarterGoodRecordsUpdateForm);

    /**
     * 修改换货记录
     * @param form
     * @return
     */
    int updateBarterRecordsGoods(SelBarterGoodRecordsUpdateForm form);

    /**
     * 查询换货详情
     * @param recordId
     * @return
     */
    SelBarterGoodsRecordDetailVo getByDetailId(String recordId);


    /**
     * 删除退货详情
     * @param recordId
     * @return
     */
    boolean deleteBy(String recordId);

    /**
     * 添加换货记录
     * @param selBarterGoodRecordsUpdateForm
     * @return
     */
    int addLogisticsInfo(SelGoodsLogisticsDetailAddForm selBarterGoodRecordsUpdateForm);
}
